package com.itheima.feign;

import com.itheima.feign.util.FeignConfig;
import com.itheima.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
//provider包里yml的服务名
@FeignClient(value = "user-provider",fallback = UserClientFallback.class,path = "/user",configuration = FeignConfig.class)
public interface UserClient {
    /**
     * 根据id获取用户信息
     * @param id
     * @return
     */
    @RequestMapping("/{id}")
    User findById(@PathVariable(name = "id") Integer id);
}
